#include <cutil_inline.h>
#include <vector_types.h>

const int BLOCK_DIM = 16;

enum FieldType
{
	CellCenter,
	FaceCenterX,
	FaceCenterY,
	FaceCenterZ
};

// arithmetic operators
template<typename T>
void sadd(int nx, int ny, int nz, T s1, T *v1, T s2, T *v);
template<typename T>
void vadd(int nx, int ny, int nz, T s1, T *v1, T s2, T *v2, T *v);
template<typename T>
void smul(int nx, int ny, int nz, T s1, T *v1, T *v);
template<typename T>
void vmul(int nx, int ny, int nz, T s1, T *v1, T *v2, T *v);

// vector field operators
template<typename T>
void divergence(int nx, int ny, int nz, T dx, T *u, T *v, T *w, T *div);
template<typename T>
void curl(int nx, int ny, int nz, T dx, T *u, T *v, T *w, T *cx, T *cy, T *cz);
template<typename T>
void l2norm(int nx, int ny, int nz, T dx, T *u, T *v, T *w, T *n);
template<typename T>
void resample(int nx, int ny, int nz, T dx, T *u, T *v, T *w, T *uout, T *vout, T *wout);
